﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
    ZFine.Domain.Entity.CourseTypeEntity thisobj = ViewData["objs"] as ZFine.Domain.Entity.CourseTypeEntity;
    if (thisobj == null)
    {
        thisobj = new ZFine.Domain.Entity.CourseTypeEntity();
    }
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/Project/CourseType/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                    $("#form1").find('.form-control,select').attr('disabled', 'disabled');

                }
            });
        } else {
            $("#form1").formSerialize("add");
        }
    });
    function submitForm() {
        var postData = $("#form1").formSerialize();
        if (!$('#form1').formValid()) {
            return false;
        }
        debugger;
        $.submitForm({
            url: "/Project/CourseType/SubmitForm?keyValue=" + keyValue,
            param: postData,
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">课程类型</th>
                    <td class="formValue">
                       @thisobj.ClassName
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">添加人</th>
                    <td class="formValue">
                       @thisobj.AddUserName
                    </td>
                </tr>
                <tr>
                    <th class="formTitle" colspan="1">课程说明</th>
                    <td class="formValue" colspan="3">
                       @Html.Raw(thisobj.ContenAbstract)
                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>
